package test;

import java.util.List;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.mike.dao.introPeopleDao;
import com.mike.dao.impl.introPeopleDaoImpl;
import com.mike.pojo.PeopleIntro;
import com.mike.pojo.T_user;
import com.mike.service.Iservice.t_userService;

public class test3 {

	@Test
	public void test1(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext_mike.xml");
		t_userService a= (t_userService) ac.getBean("t_userServiceImpl");
		T_user t_user = new T_user("a123", "123");
		int b = a.query(t_user);
		System.out.println(b);
	}
	
	@Test
	public void test2(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext_mike.xml");
		introPeopleDao e = (introPeopleDao) ac.getBean("introPeopleDaoImpl");
		List<PeopleIntro> list = e.query1();
		System.out.println(list);
	}
}
